﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="MemberRegistration.ascx.cs" Inherits="UserControls_MemberRegistration" %>
<style type="text/css">
    .auto-style2 {
        width: 50%;
        height: 387px;
        font-family: Arial, Helvetica, sans-serif;
        font-size: small;
        background-color: white;
    }
    .auto-style3 {
        width: 205px;
        text-align: right;
    }
    .auto-style5 {
        width: 451px;
    }
    .auto-style6 {
        width: 131px;
    }
    .auto-style7 {
        text-align: right;
        height: 52px;
    }
    .auto-style8 {
        width: 131px;
        height: 52px;
    }
    .auto-style9 {
        width: 451px;
        height: 52px;
    }
    .auto-style10 {
        text-align: right;
        height: 8px;
    }
</style>

<table class="auto-style2" style="border: thin solid #99CCFF; margin-left: 10px; text-indent: 10px; margin-top: 10px;">
    <tr>
        <td class="auto-style7" colspan="3" style="text-align: left">
            <span style="color: rgb(236, 167, 109); font-family: tahoma; font-size: 22px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none;">Registration</span></td>
    </tr>
    <tr>
        <td class="auto-style10" colspan="3" style="text-align: left">
            <span style="color: rgb(236, 167, 109); font-family: tahoma; font-size: 14px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none;">New to Cencol Gamer.com? Register Below.</span></td>
    </tr>
    <tr>
        <td class="auto-style7">
            <asp:Label ID="Label1" runat="server" Text="First Name"></asp:Label>
        </td>
        <td class="auto-style8">
            <asp:TextBox ID="txtFName" runat="server" Width="158px"></asp:TextBox>
        </td>
        <td class="auto-style9">
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtFName" ErrorMessage="First Name is required" ForeColor="#990033" Display="Dynamic" SetFocusOnError="True" Font-Size="X-Small"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" ControlToValidate="txtFName" Display="Dynamic" ErrorMessage="You cannot use numbers in your name" ForeColor="#990033" SetFocusOnError="True" ValidationExpression="^[a-zA-Z\s]+$" Font-Size="X-Small"></asp:RegularExpressionValidator>
        </td>
    </tr>
    <tr>
        <td class="auto-style3">
            <asp:Label ID="Label2" runat="server" Text="Last Name"></asp:Label>
        </td>
        <td class="auto-style6">
            <asp:TextBox ID="txtLName" runat="server" Width="155px"></asp:TextBox>
        </td>
        <td class="auto-style5">
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtLName" ErrorMessage="Last Name is required" ForeColor="#990033" Display="Dynamic" SetFocusOnError="True" Font-Size="X-Small"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator6" runat="server" ControlToValidate="txtLName" Display="Dynamic" ErrorMessage="You cannot use numbers in your name" ForeColor="#990033" SetFocusOnError="True" ValidationExpression="^[a-zA-Z\s]+$" Font-Size="X-Small"></asp:RegularExpressionValidator>
        </td>
    </tr>
    <tr>
        <td class="auto-style3">
            <asp:Label ID="Label12" runat="server" Text="Gender"></asp:Label>
        </td>
        <td class="auto-style6">
            <asp:DropDownList ID="ddlGender" runat="server">
                <asp:ListItem>Male</asp:ListItem>
                <asp:ListItem>Female</asp:ListItem>
            </asp:DropDownList>
        </td>
        <td class="auto-style5">
            &nbsp;</td>
    </tr>
    <tr>
        <td class="auto-style3">
            <asp:Label ID="Label3" runat="server" Text="Age"></asp:Label>
        </td>
        <td class="auto-style6">
            <asp:TextBox ID="txtAge" runat="server" Width="47px" ToolTip="At least 18 years"></asp:TextBox>
        </td>
        <td class="auto-style5">
            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtAge" ErrorMessage="Age is required" ForeColor="#990033" Display="Dynamic" SetFocusOnError="True" Font-Size="X-Small"></asp:RequiredFieldValidator>
            <asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="txtAge" Display="Dynamic" ErrorMessage="Incorrect input. Also must be at least 18 years" ForeColor="#990033" MaximumValue="150" MinimumValue="18" SetFocusOnError="True" Type="Integer" Font-Size="X-Small"></asp:RangeValidator>
        </td>
    </tr>
    <tr>
        <td class="auto-style3">
            <asp:Label ID="Label5" runat="server" Text="Street Address"></asp:Label>
        </td>
        <td class="auto-style6">
            <asp:TextBox ID="txtStreetAddr" runat="server" Width="156px"></asp:TextBox>
        </td>
        <td class="auto-style5">
            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtStreetAddr" ErrorMessage="Street Address is required" ForeColor="#990033" Display="Dynamic" SetFocusOnError="True" Font-Size="X-Small"></asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td class="auto-style3">
            <asp:Label ID="Label7" runat="server" Text="Province"></asp:Label>
        </td>
        <td class="auto-style6">
            <asp:DropDownList ID="ddlProvince" runat="server" DataSourceID="CustomerInfoSource" DataTextField="ProvCode" DataValueField="ProvCode">
            </asp:DropDownList>
            <asp:SqlDataSource ID="CustomerInfoSource" runat="server" ConnectionString="<%$ ConnectionStrings:BalloonShopConnection %>" SelectCommand="SELECT [ProvCode] FROM [Provinces]"></asp:SqlDataSource>
        </td>
        <td class="auto-style5">&nbsp;</td>
    </tr>
    <tr>
        <td class="auto-style3">
            <asp:Label ID="Label6" runat="server" Text="City"></asp:Label>
        </td>
        <td class="auto-style6">
            <asp:DropDownList ID="ddlCity" runat="server" Height="26px" Width="130px" AutoPostBack="True" DataSourceID="CustomerCityInfo" DataTextField="City" DataValueField="City">
            </asp:DropDownList>
            <asp:SqlDataSource ID="CustomerCityInfo" runat="server" ConnectionString="<%$ ConnectionStrings:BalloonShopConnection %>" SelectCommand="SELECT [City] FROM [Cities] WHERE ([ProvCode] = @ProvCode)">
                <SelectParameters>
                    <asp:ControlParameter ControlID="ddlProvince" Name="ProvCode" PropertyName="SelectedValue" Type="String" />
                </SelectParameters>
            </asp:SqlDataSource>
        </td>
        <td class="auto-style5">&nbsp;</td>
    </tr>
    <tr>
        <td class="auto-style3">
            <asp:Label ID="Label8" runat="server" Text="Postal Code"></asp:Label>
        </td>
        <td class="auto-style6">
            <asp:TextBox ID="txtPostal" runat="server" OnTextChanged="TextBox1_TextChanged"></asp:TextBox>
        </td>
        <td class="auto-style5">
            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="txtPostal" ErrorMessage="Postal Code is required" ForeColor="#990033" Display="Dynamic" SetFocusOnError="True" Font-Size="X-Small"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtPostal" Display="Dynamic" ErrorMessage="Postal code is not in the correct format" ForeColor="#990033" SetFocusOnError="True" ValidationExpression="^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ]( )?\d[ABCEGHJKLMNPRSTVWXYZ]\d$" Font-Size="X-Small"></asp:RegularExpressionValidator>
        </td>
    </tr>
    <tr>
        <td class="auto-style3">
            <asp:Label ID="Label13" runat="server" Text="Phone Number"></asp:Label>
        </td>
        <td class="auto-style6">
            <asp:TextBox ID="txtPhone" runat="server" Width="151px" ToolTip="xxx-xxx-xxxx"></asp:TextBox>
        </td>
        <td class="auto-style5">
            <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ControlToValidate="txtPhone" Display="Dynamic" ErrorMessage="Phone Number is required" ForeColor="#990033" SetFocusOnError="True" Font-Size="X-Small"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txtPhone" Display="Dynamic" ErrorMessage="Phone number is in incorrect format" ForeColor="#990033" SetFocusOnError="True" ValidationExpression="^(\([2-9]|[2-9])(\d{2}|\d{2}\))(-|.|\s)?\d{3}(-|.|\s)?\d{4}$" Font-Size="X-Small"></asp:RegularExpressionValidator>
        </td>
    </tr>
    <tr>
        <td class="auto-style3">
            <asp:Label ID="Label9" runat="server" Text="Email Address"></asp:Label>
        </td>
        <td class="auto-style6">
            <asp:TextBox ID="txtEmail" runat="server" Width="154px" OnTextChanged="txtEmail_TextChanged" ToolTip="name@domain.com"></asp:TextBox>
        </td>
        <td class="auto-style5">
            <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="txtEmail" ErrorMessage="eMail Address is required" ForeColor="#990033" Display="Dynamic" SetFocusOnError="True" Font-Size="X-Small"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ControlToValidate="txtEmail" Display="Dynamic" ErrorMessage="e-mail is not in the valid format. E.g.  name@domain.com" ForeColor="#990033" SetFocusOnError="True" ValidationExpression="^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$" Font-Size="X-Small"></asp:RegularExpressionValidator>
        </td>
    </tr>
    <tr>
        <td class="auto-style3">
            <asp:Label ID="Label10" runat="server" Text="Password"></asp:Label>
        </td>
        <td class="auto-style6">
            <asp:TextBox ID="txtPwd" runat="server" Width="154px" TextMode="Password" ToolTip="Must have at least 6 characters and must contain at least one digit character"></asp:TextBox>
        </td>
        <td class="auto-style5">
            <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ErrorMessage="Password is a required field" ForeColor="#990033" ControlToValidate="txtPwd" Display="Dynamic" Font-Size="X-Small"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtPwd" Display="Dynamic" ErrorMessage="Must have at least 6 characters and must contain at least one digit character" ForeColor="#990033" ValidationExpression="^.*(?=.{6,})(?=.*[a-zA-Z])(?=.*\d).*$" Font-Size="X-Small"></asp:RegularExpressionValidator>
        </td>
    </tr>
    <tr>
        <td class="auto-style3">
            <asp:Label ID="Label11" runat="server" Text="Confirm Password"></asp:Label>
        </td>
        <td class="auto-style6">
            <asp:TextBox ID="txtConfirmPwd" runat="server" Width="151px" TextMode="Password"></asp:TextBox>
        </td>
        <td class="auto-style5">
            <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="txtPwd" ControlToValidate="txtConfirmPwd" Display="Dynamic" ErrorMessage="Password fields must match" ForeColor="#990033" Font-Size="X-Small"></asp:CompareValidator>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="txtConfirmPwd" Display="Dynamic" ErrorMessage="Re-type the password" ForeColor="#990033" Font-Size="X-Small"></asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td class="auto-style3">&nbsp;</td>
        <td class="auto-style6">
            <asp:Button ID="btnRegister" runat="server" OnClick="btnRegister_Click" Text="Register Now" Width="161px" BackColor="#00698C" ForeColor="White" style="font-weight: 700; font-family: Arial, Helvetica, sans-serif;" BorderColor="#003366" BorderStyle="Groove" Height="30px" />
        </td>
        <td class="auto-style5">&nbsp;</td>
    </tr>
</table>
<p>
    &nbsp;</p>
<p>
    &nbsp;</p>

